package com.yyfax.pay.third.model.to.fuiou.xml;

import java.io.Serializable;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.io.xml.QNameMap;
import com.thoughtworks.xstream.io.xml.StaxDriver;

/**
 * 卡bin查询响应参数<br>
 * <FM>
 * <Rcd>0000</Rcd>
 * <RDesc>成功</RDesc>
 * <Ctp>02</Ctp>
 * <Cnm>中信银行</Cnm>
 * <InsCd>0863020000</InsCd>
 * <Sign>4nsdi123basd9asdn91f</Sign>
 * </FM>
 * 
 * @author buyi
 * @date 2017-06-28 16:55:29
 * @since v1.1.0
 */
@SuppressWarnings("serial")
@XStreamAlias("FM")
public class CardBinRsp implements Serializable {

	/** 响应代码 */
	@XStreamAlias("Rcd")
	private String rcd;
	/** 中文描述 */
	@XStreamAlias("RDesc")
	private String rDesc;

	/** 银行卡类型 */
	@XStreamAlias("Ctp")
	private String ctp;
	/** 银行名称 */
	@XStreamAlias("Cnm")
	private String cnm;

	/** 银行机构号 */
	@XStreamAlias("InsCd")
	private String insCd;

	/** 签名串 */
	@XStreamAlias("Sign")
	private String sign;

	public String getRcd() {
		return rcd;
	}

	public void setRcd(String rcd) {
		this.rcd = rcd;
	}

	public String getrDesc() {
		return rDesc;
	}

	public void setrDesc(String rDesc) {
		this.rDesc = rDesc;
	}

	public String getCtp() {
		return ctp;
	}

	public void setCtp(String ctp) {
		this.ctp = ctp;
	}

	public String getCnm() {
		return cnm;
	}

	public void setCnm(String cnm) {
		this.cnm = cnm;
	}

	public String getInsCd() {
		return insCd;
	}

	public void setInsCd(String insCd) {
		this.insCd = insCd;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	/**
	 * XML字符串转换成实体{@link CardBinRsp}
	 * 
	 * @author heizq
	 * @date 2017-4-12 10:53:28
	 * @since v1.0.0
	 * @param xml
	 * @return 返回{@link CardBinRsp}
	 */
	public static CardBinRsp fromXml(String xml) {
		QNameMap qmap = new QNameMap();
		qmap.setDefaultPrefix("");
		StaxDriver staxDriver = new StaxDriver(qmap);
		XStream xstream = new XStream(staxDriver);
		xstream.autodetectAnnotations(true);
		xstream.ignoreUnknownElements();
		xstream.alias("FM", CardBinRsp.class);
		return (CardBinRsp) xstream.fromXML(xml);
	}

}
